package com.gitee.liuzhi.common.util;

import lombok.experimental.UtilityClass;

/**
 * @Author liuzhi
 * @Date 2023/8/29 22:10
 * @Version 1.0
 * @Description 线程工具
 */
@UtilityClass
public class ThreadUtil {

    /**
     * 睡眠
     *
     * @param second 秒
     */
    public void sleep(int second) {
        try {
            Thread.sleep(second * 1000L);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    /**
     * 固定睡眠一秒
     */
    public void fixedSleep() {
        sleep(1);
    }

}
